unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    edt1: TEdit;
    edt2: TEdit;
    edt3: TEdit;
    btn1: TButton;
    lbl1: TLabel;
    lbl2: TLabel;
    lbl3: TLabel;
    btn2: TButton;
    btn3: TButton;
    procedure btn1Click(Sender: TObject);
    procedure btn2Click(Sender: TObject);
    procedure btn3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
function gethdcode: string; stdcall;external 'jm.dll';
function EncryptString(Source, Key: string): string; stdcall;external 'jm.dll';
function UnEncryptString(Source, Key: string): string; stdcall;external 'jm.dll';
var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btn1Click(Sender: TObject);
 begin
   edt1.Text:=gethdcode;
 end;

procedure TForm1.btn2Click(Sender: TObject);
begin
edt2.Text:=EncryptString(edt1.Text,'tzscwl') ;
end;

procedure TForm1.btn3Click(Sender: TObject);
begin
edt3.Text:=UnEncryptString(edt2.Text,'tzscwl')
end;

end.
